<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改商品分类')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-categorys-edit" th:object="${lqmCategorys}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">名称：</label>
                <div class="col-sm-8">
                    <input name="name" th:field="*{name}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">父ID：</label>
                <div class="col-sm-8">
                    <input name="parentId" th:field="*{parentId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">路径：</label>
                <div class="col-sm-8">
                    <input name="path" th:field="*{path}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">排序：</label>
                <div class="col-sm-8">
                    <input name="order" th:field="*{orders}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">是否显示：</label>
                <div class="col-sm-8">
                    <div class="radio-box">
                        <input type="radio" name="isShown" value="1" required>
                        <label th:for="isShown" th:text="显示"></label>
                    </div>
                    <div class="radio-box">
                        <input type="radio" name="isShown" value="0" required>
                        <label th:for="isShown" th:text="隐藏"></label>
                    </div>
                   <!-- <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>-->
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">是否标记：</label>
                <div class="col-sm-8">
                    <div class="radio-box">
                        <input type="radio" name="isHot" value="1" required>
                        <label th:for="isHot" th:text="标记"></label>
                    </div>
                    <div class="radio-box">
                        <input type="radio" name="isHot" value="0" required>
                        <label th:for="isHot" th:text="取消"></label>
                    </div>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">图标：</label>
                <div class="col-sm-8">
                    <input name="fontIcon" th:field="*{fontIcon}" class="form-control" type="text">
                </div>
            </div>

            <div class="form-group">    
                <label class="col-sm-3 control-label">更新时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="updatedAt" th:value="${#dates.format(lqmCategorys.updatedAt, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "lqm/categorys";
        $("#form-categorys-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-categorys-edit').serialize());
            }
        }

        $("input[name='updatedAt']").datetimepicker({
            format: "yyyy-mm-dd HH:mm:ss",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>